import 'package:demo/theme/app_colors.dart';
import 'package:demo/theme/app_text_theme.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'package:get/get.dart';

import 'feedback_controller.dart';


class FeedbackView extends GetView<FeedbackController> {
  const FeedbackView({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Color_bg,
      appBar: AppBar(
        title:  Text('反馈建议',style: text_title_black),
      ),
      body: Column(
        children: [
          Expanded(
            child: SingleChildScrollView(
              child: Column(
                children: [
                  Column(
                    children: [
                      SizedBox(height: 25.w),
                      Container(
                        margin: EdgeInsets.symmetric(horizontal: 24.w),
                        child: TextField(
                          keyboardType: TextInputType.number,
                          onChanged: (value) => controller.contentStr = value,
                          cursorColor: Color_grey,
                          cursorHeight: 20.w,
                          style: text_131732_16,
                          maxLines:10,
                          decoration: InputDecoration(
                            prefixText: "  ",
                            isDense: true,
                            filled: true,
                            fillColor: Color_white,
                            contentPadding: EdgeInsets.symmetric(vertical: 15.w,horizontal: 12.w),
                            counterText: "", // 去掉底部计数
                            enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8.w), borderSide: const BorderSide(style: BorderStyle.none)), //无焦点时状态
                            focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8.w), borderSide: const BorderSide(style: BorderStyle.none)), //有焦点时状态
                            hintText: '如您有任何反馈，请留言，我们一般会在24小时内与您电话联系，请保持手机畅通！',
                            hintStyle: text_grey_16,
                          ),
                        ),
                      ),
                      SizedBox(height: 25.w),
                      Container(
                        margin: EdgeInsets.symmetric(horizontal: 24.w),
                        child: TextField(
                          controller: controller.textController,
                          onChanged: (value) => controller.phoneStr = value,
                          cursorColor: Color_grey,
                          cursorHeight: 20.w,
                          style: text_131732_16,
                          maxLines:1,
                          maxLength: 11,
                          keyboardType: TextInputType.number,
                          decoration: InputDecoration(
                            prefixText: "  ",
                            isDense: true,
                            filled: true,
                            fillColor: Color_white,
                            contentPadding: EdgeInsets.symmetric(vertical: 15.w,horizontal: 12.w),
                            counterText: "", // 去掉底部计数
                            enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8.w), borderSide: const BorderSide(style: BorderStyle.none)), //无焦点时状态
                            focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8.w), borderSide: const BorderSide(style: BorderStyle.none)), //有焦点时状态
                            hintText: '请输入您的手机号(非必填)',
                            hintStyle: text_grey_16,
                          ),
                        ),
                      ),
                    ],
                  )
                ],
              ),
            ),
          ),
          SizedBox(height: 25.w),
          InkWell(
            highlightColor: Colors.transparent, // 透明色
            splashColor: Colors.transparent, // 透明色
            onTap: () => controller.submit(),
            child: Container(
                margin: EdgeInsets.symmetric(horizontal: 36.w),
                height: 45.w,
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(25.w),
                  color: Color_main,
                ),
                child: Center(child: Text("提交",style: text_white_16))),
          ),
          SizedBox(height: 25.w)
        ],
      ) ,
    );
  }
}
